<script lang="tsx">
import { defineComponent, h } from 'vue'

export default defineComponent({
  name: 'BaseTable',
  props: {
    // 定义组件的属性
    data: {
      type: Array,
      required: true
    },
    prop2: {
      type: Number,
      default: 0
    }
  },
  setup(props, { emit }) {
    // 在 setup 函数中定义组件的逻辑和渲染方法
    return () => h('div', props.prop1 + ': ' + props.prop2)
  }
})
</script>
<template>
  <el-table :data="data" border style="width: 100%">
    <el-table-column type="selection" width="55" />
    <el-table-column prop="date" label="Date" width="180" />
    <el-table-column prop="name" label="Name" width="180" />
    <el-table-column prop="address" label="Address" />
  </el-table>
  <el-pagination background layout="prev, pager, next" :total="1000" />
</template>
